package com.cxhc.system.mapper.app;

import com.cxhc.system.domain.app.CmHouseholdInfo;
import org.apache.ibatis.annotations.MapKey;

import java.util.List;
import java.util.Map;

/**
 * 住户Mapper接口
 * 
 * @author Dhq
 * @date 2024-11-14
 */
public interface CmHouseholdInfoMapper 
{
    /**
     * 查询住户
     * 
     * @param id 住户主键
     * @return 住户
     */
    public CmHouseholdInfo selectCmHouseholdInfoById(Long id);

    /**
     * 根据审核人id查询人员
     * @param checkNameId 审核人Id
     * @return 房间信息
     */
    public List<Map<String,String>> selectHouseholdByCheckNameId(String checkNameId);

    /**
     * 查询住户列表
     * 
     * @param cmHouseholdInfo 住户
     * @return 住户集合
     */
    public List<CmHouseholdInfo> selectCmHouseholdInfoList(CmHouseholdInfo cmHouseholdInfo);

    /**
     * 新增住户
     * 
     * @param cmHouseholdInfo 住户
     * @return 结果
     */
    public int insertCmHouseholdInfo(CmHouseholdInfo cmHouseholdInfo);

    /**
     * 修改住户
     * 
     * @param cmHouseholdInfo 住户
     * @return 结果
     */
    public int updateCmHouseholdInfo(CmHouseholdInfo cmHouseholdInfo);

    /**
     * 删除住户
     * 
     * @param id 住户主键
     * @return 结果
     */
    public int deleteCmHouseholdInfoById(Long id);

    /**
     * 批量删除住户
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteCmHouseholdInfoByIds(Long[] ids);

    /**
     * 查询公寓人员数量
     *
     * @return 公寓人员数量
     */
    @MapKey("apartId")
    public Map<String, Map<String,Object>> selectHouseholdNumByApartId();

    /**
     * 查询公寓人员数量
     *
     * @return 公寓人员数量
     */
    @MapKey("apartId")
    public Map<String, Map<String,Object>> selectEmphasisHouseholdNumByApartId();

    /**
     * 查询公寓人员数量
     *
     * @return 公寓人员数量
     */
    @MapKey("apartId")
    public Map<String, Map<String,Object>> selectCarNumByApartId();
}
